![]() |
CuDoubleSidedScannerC
1.22
|
Contains all library APIs. Main file for CuDoubleSidedScannerC library. More...
Functions | |
| DssResult WINAPI | InitLibrary (LogVerbosity logVerbosityLevel, ScannerDevice *pDevicesList, LPDWORD pdwDeviceNum, wchar_t *szLogFilePath, DWORD dwWorkingParam) |
| DssResult WINAPI | DeInitLibrary () |
| DssResult WINAPI | GetDevicesAvailable (ScannerDevice *pDevicesList, LPDWORD pdwDeviceNum) |
| DssResult WINAPI | ConnectScanner (DeviceID device) |
| DssResult WINAPI | Disconnect (DeviceID device) |
| DssResult WINAPI | GetLibraryRelease (CHAR *cLibRel, DWORD dwBuffSizeChar) |
| DssResult WINAPI | GetScannerStatus (DeviceID device, ScannerStatusStruct *pStatus) |
| DssResult WINAPI | HardwareReset (DeviceID device) |
| DssResult WINAPI | HardwareResetRT (DeviceID device) |
| DssResult WINAPI | GetLastScanImageData (DeviceID device, ImageFromScannerStruct *pImageSideA, ImageFromScannerStruct *pImageSideB) |
| DssResult WINAPI | StartScan (DeviceID device, ScanParametersStruct *pCurrentParameters, LPDWORD pdwImageSizeSideA, LPDWORD pdwImageSizeSideB) |
| DssResult WINAPI | CheckScanParameters (DeviceID device, ScanParametersStruct *pCurrentParameters) |
| DssResult WINAPI | GetFirmwareRelease (DeviceID device, CHAR *szFwRel, DWORD dwRelOutSize) |
| DssResult WINAPI | GetHardwareRelease (DeviceID device, CHAR *szHwRel, DWORD dwRelOutSize) |
| DssResult WINAPI | GetModelRelease (DeviceID device, CHAR *szModelRel, DWORD dwRelOutSize) |
| DssResult WINAPI | GetScanCounter (DeviceID device, DWORD *pdwScanCounter) |
| DssResult WINAPI | GetVoidPrintedPaperLen (DeviceID device, DWORD *pdwPrintedPaperCm) |
| DssResult WINAPI | GetMICRData_CMC7 (DeviceID device, BYTE *bufferData, DWORD dwBufferSize, LPDWORD pdwDataSize) |
| DssResult WINAPI | MoveForm (DeviceID device, FormMovement *pMovement) |
| DssResult WINAPI | GetUltrasonicParameters (DeviceID device, UltrasonicParametersStruct *pUltraParams) |
| DssResult WINAPI | SetUltrasonicParameters (DeviceID device, UltrasonicParametersStruct *pUltraParams) |
| DssResult WINAPI | SetLedBar (DeviceID device, LedBarSetting *pLedBarSettings) |
| DssResult WINAPI | UpdateFirmware (DeviceID device, wchar_t *fileNameAndPath, BOOL bCheckFileValidity) |
| DssResult WINAPI | IsOnline (DeviceID device) |
| DssResult WINAPI | DisengageScanner (DeviceID device, FormStanding *pMovement, DWORD dwTimeout) |
| DssResult WINAPI | SetBWThreshold (DeviceID device, BYTE bBWThreshold) |
| DssResult WINAPI | GetBWThreshold (DeviceID device, BYTE *pbBWThreshold) |
| DssResult WINAPI | SetCropParameters (DeviceID device, CropParametersStruct *pCurrentCropParameters) |
| DssResult WINAPI | GetCropParameters (DeviceID device, CropParametersStruct *pCurrentCropParameters) |
| DssResult WINAPI | GetCapabilities (DeviceID device, ScannerCapabilities *pCapabilities) |
| DssResult WINAPI | ClearImagesData (DeviceID device) |
| DssResult WINAPI | VoidTicket (DeviceID device, LPBYTE pBufferData, DWORD dwBufferSize, DWORD dwYMovementInDot, FormStanding movementAfterVoid, ScannerPrintDensity printDensity, DWORD dwReserved) |
| DssResult WINAPI | SetRejectMargins (DeviceID device, BYTE bRejectMarginL, BYTE bRejectMarginR) |
| DssResult WINAPI | SetColorGamma (DeviceID device, ScanSide sideToSet, BYTE colorChannelBitMask, USHORT clipBlack, USHORT clipWhite, BYTE gamma10, BYTE *reserved, DWORD dwReservedSize) |
| DssResult WINAPI | SetColorGammaCurves (DeviceID device, ScanSide sideToSet, GammaChannel gChannel, BYTE *bDataValue, DWORD dwDataValueSize) |
Contains all library APIs. Main file for CuDoubleSidedScannerC library.
| DssResult WINAPI CheckScanParameters | ( | DeviceID | device, |
| ScanParametersStruct * | pCurrentParameters | ||
| ) |
Checks if the parameters indicated by *pCurrentParameters are correct for this device.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pCurrentParameters | All the image parameters for the next scan job. |
Clears the memory for last scanned image/images. Call this API is not mandatory: previous image data will be automatically deleted during the following scan job .
| [in] | device | The device ID indicating which device the application will communicate to. |
Connect to the scanner. This function must be called once, just after InitLibrary.
| [in] | device | The device ID indicating which device the application will communicate to. This value corresponds to ScannerDevice::dwDeviceID present in each ScannerDevice in pDevicesList list, retreived by InitLibrary. |
| DssResult WINAPI DeInitLibrary | ( | ) |
De-initialize dll. Call this function as the last function before your application unloads the library.
Disconnect the scanner connection. This function must be called just before DeInitLibrary.
| [in] | device | The device ID indicating which device the application will communicate to. This value corresponds to ScannerDevice::dwDeviceID present in each ScannerDevice in pDevicesList list, retreived by InitLibrary. |
| DssResult WINAPI DisengageScanner | ( | DeviceID | device, |
| FormStanding * | pMovement, | ||
| DWORD | dwTimeout | ||
| ) |
Tries to disengage scanner from a paper form. Try to move the paper form forward or backward, depending on *pMovement. Retries for a maximum of dwTimeout seconds.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pMovement | Indicates wheter the paper has to be moved forward or backward. |
| [in] | dwTimeout | Max retry timeout, in seconds. Advised value is at least 30 seconds. |
Gets the Threshold value for Black & White conversion.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pbBWThreshold | Black & White Threshold. |
| DssResult WINAPI GetCapabilities | ( | DeviceID | device, |
| ScannerCapabilities * | pCapabilities | ||
| ) |
Returns a scanner capabilities list.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pCapabilities | A pointer indicating the scanner capabilities. This structure must have been allocated by the calling process. |
| DssResult WINAPI GetCropParameters | ( | DeviceID | device, |
| CropParametersStruct * | pCurrentCropParameters | ||
| ) |
Gets the current Parameters for Crop / Deskew operations.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pCurrentCropParameters | Crop / Deskew Threshold for edges identification. |
| DssResult WINAPI GetDevicesAvailable | ( | ScannerDevice * | pDevicesList, |
| LPDWORD | pdwDeviceNum | ||
| ) |
Get Devices list. Returns the Array of ScannerDevice.
| [out] | pDevicesList | Array of ScannerDevice allocated by the calling process. It will contain data about the connected compatible scanners. |
| [in,out] | pdwDeviceNum | Pointer to a DWORD that indicates the number of devices present in *pDevicesList array. In input, indicates the allocated number of elements of pDevicesList, in output indicates the found number of devices, that is the valid element in pDevicesList. |
Get scanner firmware release.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | szFwRel | A null terminated string containing the scanner firmware release. This buffer must have been allocated by the calling process. |
| [in] | dwRelOutSize | size of szFwRel, in CHAR |
Get scanner hardware release.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | szHwRel | A null terminated string containing the scanner hardware release. This buffer must have been allocated by the calling process. |
| [in] | dwRelOutSize | size of szHwRel, in CHAR |
| DssResult WINAPI GetLastScanImageData | ( | DeviceID | device, |
| ImageFromScannerStruct * | pImageSideA, | ||
| ImageFromScannerStruct * | pImageSideB | ||
| ) |
Gets the last scanned image (or images).
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pImageSideA | A pointer to a struct containing the last scanned image on side A (also called side UP or front side). Can be NULL if a side A scan was not requested during the last scan. Structure and the contained buffers must be allocated by the calling process. |
| [out] | pImageSideB | B pointer to a struct containing the last scanned image on side B (also called side DOWN or back side). Can be NULL if a side B scan was not requested during the last scan. Structure and the contained buffers must be allocated by the calling process. |
| DssResult WINAPI GetLibraryRelease | ( | CHAR * | cLibRel, |
| DWORD | dwBuffSizeChar | ||
| ) |
Get library release.
| [out] | cLibRel | A null terminated string containing the library release. This buffer must have been allocated by the calling process. |
| [in] | dwBuffSizeChar | size of cLibRel, in CHAR |
| DssResult WINAPI GetMICRData_CMC7 | ( | DeviceID | device, |
| BYTE * | bufferData, | ||
| DWORD | dwBufferSize, | ||
| LPDWORD | pdwDataSize | ||
| ) |
Get magnetic ink characters for CMC 7 standard. Scanner decodes magnetic data during a scan job. If bufferData == NULL or dwBufferSize == 0, return DssResult_SmallBuffer and in *pdwDataSize the needed buffer size.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | bufferData | A buffer containing CMC7 data. This buffer must have been allocated by the calling process. Data size is always less or equal to 256 bytes. |
| [in] | dwBufferSize | Size of bufferData, in bytes. |
| [out] | pdwDataSize | Size, in bytes, of valid data contained in bufferData |
Get scanner model release.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | szModelRel | A null terminated string containing the scanner model release. This buffer must have been allocated by the calling process. |
| [in] | dwRelOutSize | size of szModelRel, in CHAR |
Get the number of the total scan jobs performed by the scanner.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pdwScanCounter | A pointer to the number of total performed scan jobs. |
| DssResult WINAPI GetScannerStatus | ( | DeviceID | device, |
| ScannerStatusStruct * | pStatus | ||
| ) |
Gets the scanner status info.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pStatus | A pointer to ScannerStatusStruct, allocated by the calling process, thatcontains the scanner status information. |
| DssResult WINAPI GetUltrasonicParameters | ( | DeviceID | device, |
| UltrasonicParametersStruct * | pUltraParams | ||
| ) |
Gets the scanner ultrasonic parameters (if supported by the device) from the RAM.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pUltraParams | A user allocated struct containing the parameters. |
Get the lenght, in cm, of the total printed paper during "void" operations.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pdwPrintedPaperCm | A pointer to the total amount, in cm, of printed paper. |
Performs a scanner hardware reset. The command is sent on the scan communication interface, so it will be queued to other commands. This operation could take several seconds, and this function returns when the scanner is returned online. The scanner connection will automatically reopen.
| [in] | device | The device ID indicating which device the application will communicate to. |
Performs a scanner hardware reset. The command is sent on the real time communication interface, so it immediately processed by the scanner: it will stop the execution of other operations in progress, if there are ones. This operation could take several seconds, and this function returns when the scanner is returned online. The scanner connection will automatically reopen.
| [in] | device | The device ID indicating which device the application will communicate to. |
| DssResult WINAPI InitLibrary | ( | LogVerbosity | logVerbosityLevel, |
| ScannerDevice * | pDevicesList, | ||
| LPDWORD | pdwDeviceNum, | ||
| wchar_t * | szLogFilePath, | ||
| DWORD | dwWorkingParam | ||
| ) |
Initializes library. This must be the first call after the LoadLibrary.
| [in] | logVerbosityLevel | Verbosity level. |
| [out] | pDevicesList | Array of ScannerDevice allocated by the calling process. It will contain data about the connected compatible scanners. |
| [in,out] | pdwDeviceNum | Pointer to a DWORD that indicates the number of devices present in *pDevicesList array. In input, indicates the allocated number of elements of pDevicesList, in output indicates the found number of devices, that is the valid element in pDevicesList. |
| [in] | szLogFilePath | Log file path. If NULL, the library uses the default path: "%Documents and settings%\CUSTOM\CuDoubleSidedScannerAPI\Log". The file name is "DoubleSidedScannerC.log". |
| [in] | dwWorkingParam | Used to set library working parameters. It is possible to set one or more WorkingParameter. To set more than one WorkingParameter, use dwWorkingParam as a sum of the wanted WorkingParameter values. 0 by default. |
Checks if the scanner communication is ON.
| [in] | device | The device ID indicating which device the application will communicate to. |
| DssResult WINAPI MoveForm | ( | DeviceID | device, |
| FormMovement * | pMovement | ||
| ) |
Moves the paper form in the way indicated by *pMovement.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pMovement | Which kind of paper movement the scanner has to perform. |
Sets the Threshold value for Black & White conversion.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | bBWThreshold | Black & White Threshold. |
| DssResult WINAPI SetColorGamma | ( | DeviceID | device, |
| ScanSide | sideToSet, | ||
| BYTE | colorChannelBitMask, | ||
| USHORT | clipBlack, | ||
| USHORT | clipWhite, | ||
| BYTE | gamma10, | ||
| BYTE * | reserved, | ||
| DWORD | dwReservedSize | ||
| ) |
Set color gamma parameters for the following scan job. Only for DeviceModel::A4_Scanner scanners.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | sideToSet | Which scan side has to be set. It is possible to select both side A+B. |
| [in] | colorChannelBitMask | Which color channel has to be set. It is possible to select more than one color channel, using color channels as bitmasks. |
| [in] | clipBlack | Value from 0 to 150, to clip color to black. Default value is 15. |
| [in] | clipWhite | Value from 100 to 256, to clip color to white. Default value is 200. |
| [in] | gamma10 | Specifies gamma value to build map curve. From 5 to 50. (16 means 1.6, 20 means 2.0). Default value is 20. |
| [in] | reserved | Set to NULL. Reserved for future developments. SET TO NULL. |
| [in] | dwReservedSize | Set to 0. Reserved for future developments. Set to 0. |
| DssResult WINAPI SetColorGammaCurves | ( | DeviceID | device, |
| ScanSide | sideToSet, | ||
| GammaChannel | gChannel, | ||
| BYTE * | bDataValue, | ||
| DWORD | dwDataValueSize | ||
| ) |
Set color gamma curves for the following scan job. Only for DeviceModel::A4_216_Void_Scanner DeviceModel::A6_Scanner scanners.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | sideToSet | Which scan side has to be set. It is possible to select both side A+B. |
| [in] | gChannel | GammaChannel Which color channel has to be set |
| [in] | bDataValue | buffer with the 256 bytes of the channel curve values. |
| [in] | dwDataValueSize | size of buffer with the curve values. Must bel always 256. |
| DssResult WINAPI SetCropParameters | ( | DeviceID | device, |
| CropParametersStruct * | pCurrentCropParameters | ||
| ) |
Sets the current Parameters for Crop / Deskew operations.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pCurrentCropParameters | Crop / Deskew Threshold for edges identification. The value must be in the range 0-255 (128 default) |
| DssResult WINAPI SetLedBar | ( | DeviceID | device, |
| LedBarSetting * | pLedBarSettings | ||
| ) |
Sets the led bar working parameters
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pLedBarSettings | Pointer a struct containing all led bar settings. |
Sets the Reject Margins
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | bRejectMarginL | Left Margin for Reject. Each step corresponds to 32pixels. The value must be in the range 0-15 (0 default). |
| [in] | bRejectMarginR | Right Margin for Reject. Each step corresponds to 32pixels. The value must be in the range 0-15 (0 default). |
| DssResult WINAPI SetUltrasonicParameters | ( | DeviceID | device, |
| UltrasonicParametersStruct * | pUltraParams | ||
| ) |
Sets the scanner ultrasonic parameters (if supported by the device) into the RAM.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [out] | pUltraParams | A user allocated struct containing the parameters. |
| DssResult WINAPI StartScan | ( | DeviceID | device, |
| ScanParametersStruct * | pCurrentParameters, | ||
| LPDWORD | pdwImageSizeSideA, | ||
| LPDWORD | pdwImageSizeSideB | ||
| ) |
Starts a scan job, according with scan parameters indicated by *pCurrentParameters. This function returns when the scan job has finished.
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pCurrentParameters | All the image parameters for the next scan job. |
| [out] | pdwImageSizeSideA | Pointer to the size, in bytes, of the image scanned on side A (up side). 0 if no scan is expected on side A. |
| [out] | pdwImageSizeSideB | Pointer to the size, in bytes, of the image scanned on side B (down side). 0 if no scan is expected on side B. |
| DssResult WINAPI UpdateFirmware | ( | DeviceID | device, |
| wchar_t * | fileNameAndPath, | ||
| BOOL | bCheckFileValidity | ||
| ) |
Performs a firmware update. This operation culd take several seconds. Don't call other scanner API during this operation. Returns when the scanner is online
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | fileNameAndPath | PSW Update file name and path. |
| [in] | bCheckFileValidity | If TRUE, the API will check the file validity before start update the firmware. Using TRUE is ADVISED. Use FALSE only when strictly necessary. |
| DssResult WINAPI VoidTicket | ( | DeviceID | device, |
| LPBYTE | pBufferData, | ||
| DWORD | dwBufferSize, | ||
| DWORD | dwYMovementInDot, | ||
| FormStanding | movementAfterVoid, | ||
| ScannerPrintDensity | printDensity, | ||
| DWORD | dwReserved | ||
| ) |
Voids the ticket inserted
| [in] | device | The device ID indicating which device the application will communicate to. |
| [in] | pBufferData | The buffer containing the data to be sent to the printer to void the ticket. |
| [in] | dwBufferSize | Size of pBufferData, in bytes |
| [in] | dwYMovementInDot | The number of dots the ticket must be moved back to align it for printing. |
| [in] | movementAfterVoid | Indicates which movement must perform the ticket after being voided: to be ejected forward, retracted backward, or kept hold for further commands by the user |
| [in] | printDensity | The print density |
| [in] | dwReserved | Reserved. Set to 0. |